home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / wc15_b.arc / ANSI1.WMS < prev    next >
Text File  |  1991-03-22  |  2KB  |  62 lines

  1. ;PlayBack of ansi files demo
  2.  
  3. STOP                             ;stops a session if started
  4. USERWINDOW(5,0,0,0)
  5. METABKG(0,0,1,"synapp.wmf")      ;displays the SYNAPPSYS logo
  6. show(6)
  7. CLEAR                 ;clear the screen also
  8. x1 = 2
  9. GOSUB pause
  10.    DIALOGBOX 50, 50, 229, 60, 21, "ANSI Color Terminal Demonstration"
  11.       LTEXT 8, 8, 213, 30, "This part of the demonstration will replay a file that contains color ANSI escape sequences.  The file is ANSI.EMU."
  12.       DEFCANCELBUTTON 83, 40, 50, 15, "&OK"
  13.    DEND
  14. dtime = 10
  15. gosub delay
  16.  
  17. DELOBJECT(0,0,0)                    ;clears the graphic
  18. show(8)
  19. OPEN("ansi.wsf","",1)           ;opens the session file setup with ANSI BBS terminal type selected
  20. x1 = 2
  21. key1 = 0
  22. key = 38
  23.  
  24.  
  25. x1 = 1
  26. sendspeckey(1,0,asc("F"))       ; 1 == alt key, selects the FILE menu
  27. gosub pause
  28. sendspeckey(0,0,asc("Y"))       ;selects the Playback menu item
  29. gosub pause
  30. sendspeckey(0,0,asc("A"))       ;types ANSI.EMU in the edit box
  31. sendspeckey(0,0,asc("N"))
  32. sendspeckey(0,0,asc("S"))
  33. sendspeckey(0,0,asc("I"))
  34. sendkey(".")
  35. sendspeckey(0,0,asc("E"))
  36. sendspeckey(0,0,asc("M"))
  37. sendspeckey(0,0,asc("U"))
  38. gosub pause
  39. sendspeckey(0,0,13)             ; send carrage return
  40.  
  41. HALT
  42.  
  43. pause:
  44. i = time?+x1
  45. while(time? <i)
  46. wend
  47. return
  48.  
  49.  
  50. delay:                          ;automatically destroys the dialog box by 
  51. i = time?+dtime                 ;sending a carrage return after a timeout
  52. j = 255                         ;if the CONTINUE button is not selected beforehand
  53. while((time?<i) && (j == 255))
  54. j = DIALOG?
  55. wend
  56. if(j == 255)
  57.   sendspeckey(0,0,13)
  58. return
  59.  
  60. END
  61.  
  62.